<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019\6\12 0012
 * Time: 21:50
 */
namespace BigVideo\IMooc\Database;

class Mysql implements IDatabase
{
    protected $conn;
    public function connect($host,$user,$passwd,$dbname){
        $conn = mysql_connect($host,$user,$passwd);
        mysql_select_db($dbname,$conn);
        $this->conn = $conn;
    }

    public function query($sql)
    {
        return mysql_query($sql,$this->conn);
    }

    public function close()
    {
        mysql_close($this->conn);
    }
}


















